package server;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.List;



public class Journal {
	private List<JournalEntry> journalEntries;
	public Journal()
	{
		this.journalEntries=new ArrayList<JournalEntry>();
	}
	public void addEntry(final Customer customer)
	{
		try {
			this.journalEntries.add(new JournalEntry(Calendar.getInstance().getTime(),(Customer)customer.clone()));
		} catch (final CloneNotSupportedException e) {			
			e.printStackTrace();
		}
	}
	public Collection<JournalEntry> getEntries()
	{
		return Collections.checkedCollection(this.journalEntries,JournalEntry.class);
	}
}
